import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import '@/utils/utils'
import './uni.promisify.adaptor'
import store from './store'

import { getToken } from './utils/auth'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App,
  store
})
app.$mount()
// #endif
Vue.prototype.$tokenName = "数字资产"
Vue.prototype.$navigateTo=(options)=>{
	if(getToken()){
		uni.showToast({
			title:"请先登录",
			icon:"none"
		})
		return uni.navigateTo({
			url:"/pages/login/index"
		})
	}
	uni.navigateTo(options);
}
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif